package com.draven.xkclass.controller;

import com.draven.xkclass.config.WeChatConfig;
import com.draven.xkclass.mapper.VideoMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
//@RestController
public class TestController {

    @RequestMapping("/test")
    public String test() {

        return "hello xkclass6666";
    }

    @Autowired
    private WeChatConfig weChatConfig;

    @RequestMapping("test_config")
    public String testConfig() {
        log.info(weChatConfig.getAppId());
        return "hello xkclass";
    }

    @Autowired
    private VideoMapper videoMapper;

    @RequestMapping("test_db")
    public Object testDB() {
        log.info(weChatConfig.getAppId());
        return videoMapper.findAll();
    }


}
